package com.pocket.demo.core.mq.rabbitMQ.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

/**
 * @author cookie.
 **/
public class TopicConsumer {

    private static final Logger LOGGER = LoggerFactory.getLogger(TopicConsumer.class);

    @RabbitListener(queues = TopicExchangeConfig.TOPIC_QUEUE_1)
    public void listenFanoutErrorQueueMessage(String msg){
        LOGGER.debug("RabbitMQ : received message from {} ：{}", TopicExchangeConfig.TOPIC_QUEUE_1, msg);
    }

    @RabbitListener(queues = TopicExchangeConfig.TOPIC_QUEUE_2)
    public void listenFanoutWarnQueueMessage(String msg){
        LOGGER.debug("RabbitMQ : received message from {} ：{}", TopicExchangeConfig.TOPIC_QUEUE_2, msg);
    }
}
